ALC_ Alphabet Codes
The ALC_
constants enable a subset of the active character set, depending on the current
language.
For example,
the French language includes  h  in the lowercase alphabet. In the same way,
    replaces  $  if ALC_MONETARY is set in British systems. For more
information about alphabets, see  Specifying an Alphabet Set  in Chapter 8 and
 Alphabet  in Chapter 5.
Comments
The following
ALC_ constants are are supported:
| 
   Constant  | 
  
   Description  | 
 
| 
   ALC_ALL  | 
  
   All
  characters except Japanese characters.  | 
 
| 
   ALC_ALPHA  | 
  
   ALC_LCALPHA
  | ALC_UCALPHA.  | 
 
| 
   ALC_ALPHANUMERIC  | 
  
   ALC_LCALPHA
  | ALC_UCALPHA | ALC_NUMERIC.  | 
 
| 
   ALC_ASCII  | 
  
   Seven-bit
  characters ASCII #20-ASCII
  #0x7F  | 
 
| 
   ALC_DBCS  | 
  
   Allow
  double-byte character set (DBCS) variety of single-byte character set (SBCS).  | 
 
| 
   ALC_DEFAULT  | 
  
   Default
  value; uses complete set of recognizable char-acters and gestures. The set of
  these is defined by the recognizer. It is the set of characters at or above
  ALC_SYSMINIMUM that the recognizer can accurately distinguish. If an
  application sets ALC_DEFAULT in the HRC object, and the recognizer is
  an alphanumeric system recognizer, the recognizer must at least support
  ALC_SYSMINIMUM as a default. ALC_DEFAULT should be the same character set as
  the complete character set for the given language minus the ALC_OTHER
  characters. If an
  application combines ALC_DEFAULT with other ALC_ values, ALC_DEFAULT is
  ignored.  | 
 
| 
   ALC_GESTURE  | 
  
   Gestures.  | 
 
| 
   ALC_GLOBALPRIORITY  | 
  
   Specifies
  that the global recognition priorities (from Tool Palette) are to be used
  during recognition. An application can control its own recognition priority
  in a control by clearing this flag and then setting its own priorities in the
  HRC.   | 
 
| 
   ALC_HIRAGANA  | 
  
   Hiragana
  characters. (Japanese version only.)  | 
 
| 
   ALC_JIS1  | 
  
   All Kanji
  Shift JIS level 1 characters. (Japanese version only.)  | 
 
| 
   ALC_KANJI  | 
  
   Kanji
  characters, Shift JIS levels 1, 2, and 3. (Japanese version only.)  | 
 
| 
   ALC_KANJIALL  | 
  
   ALC_ALL |
  ALC_HIRAGANA | ALC_KATAKANA | ALC_KANJI. (Japanese version only.)  | 
 
| 
   ALC_KANJISYSMINIMUM  | 
  
   Minimum set
  of characters needed for Japanese system recognizer. Same as ALC_SYSMINIMUM |
  ALC_HIRAGANA | ALC_KATAKANA | ALC_JIS1. (Japanese version only.)  | 
 
| 
   ALC_KATAKANA  | 
  
   Katakana
  characters. (Japanese version only.)  | 
 
| 
   ALC_LCALPHA  | 
  
   Lowercase
  letters a-z.  | 
 
| 
   ALC_MATH  | 
  
   Math
  symbols:  %^*()-+={ }<>,/.  | 
 
| 
   ALC_MONETARY  | 
  
   Monetary
  symbols:  ,.$ or appropriate currency
  desig-nation such as the yen or pound sterling symbol, accord-ing to the
  current language setting.  | 
 
| 
   ALC_NONPRINT  | 
  
   Space, tab,
  carriage-return, and control glyphs.  | 
 
| 
   ALC_NOPRIORITY  | 
  
   No
  priority. This value means the application has no preference for one type of
  symbol over another.  | 
 
| 
   ALC_NUMERIC  | 
  
   Numerals 0-9.  | 
 
| 
   ALC_OEM  | 
  
   Bits
  reserved for recognizer capabilities specific to the original equipment
  manufacturer (OEM).  | 
 
| 
   ALC_OTHER  | 
  
   Other symbols:  @ # | _ ~ [ ]. That is, all other symbols
  not included in ALC_ALPHANUMERIC, ALC_MONETARY, ALC_MATH, and ALC_PUNC.  | 
 
| 
   ALC_PUNC  | 
  
   Punctuation:  !-;`"?()&.,\.  | 
 
| 
   ALC_RESERVED  | 
  
   Reserved.  | 
 
| 
   ALC_SYSMINIMUM  | 
  
   Minimum set
  of characters needed for Roman alphabet system recognizers:  ALPHANUMERIC | ALC_PUNC | ALC_WHITE |
  ALC_GEST.  | 
 
| 
   ALC_UCALPHA  | 
  
   Uppercase
  letters A-Z.  | 
 
| 
   ALC_USEBITMAP  | 
  
   (Description
  follows table.)  | 
 
| 
   ALC_WHITE  | 
  
   White
  space. If this value is not set in the HRC object, the recognizer
  should ignore any white space left between characters. Thus, ALC_WHITE is
  included in the ALC_DEFAULT. For example, in the zip code field of the Hform
  sample application, where ALC_NUMERIC | ALC_GESTURE is set, the user does not
  have to worry about getting any extraneous spaces.  | 
 
 
If
ALC_USEBITMAP is set, it indicates the recognizer should adopt an alphabet set
defined by the application. The defined set specifies individual characters of
an alphabet by setting bits in a 256-bit bitfield. The lowest bit corresponds
to the first character of the alphabet, the second bit to the second character,
and so forth.
An
application passes the bitfield to a recognizer through the SetAlphabetHRC or SetBoxAlphabetHRC functions. The following
code shows how. Assume the array rgbfSet holds the desired bit values.
HRC    
hrc;                         //
HRC handle 
BYTE   
rgbfSet[cbRcrgbfAlcMax]      //
256-bit bitfield 
 
SetAlphabetHRC( hrc, ALC_USEBITMAP, (LPBYTE) rgbSet
); 
 
ALC_USEBITMAP
can be combined with other ALC_ values using the bitwise-OR operator. An
application can thus, for example, select certain letters with a defined bitmap
and combine them with all numerals and punctuation.
For Asian
languages other than Japanese, refer to the appropriate subsets within the
language: phonetic symbols for words within the language, phonetic symbols for
words outside the language, and native pictographs. For example, in Korean,
ALC_HANGUEL equals ALC_KATAKANA, and ALC_HANJA equals ALC_KANJI.
For kanji and
other Asian encodings, different effects are possible depending on the state of
ALC_DBCS. These effects are described in the following table.
| 
   Character
  in  | 
  
   ALC_DBCS
  = 0  | 
  
   ALC_DBCS
  = 1  | 
 
| 
   ALC_HIRAGANA  | 
  
   N/A  | 
  
   Shift JIS
  characters 0x8154, 0x8155, and 0x829F - 0x82F1.  | 
 
| 
   ALC_JIS1  | 
  
   N/A  | 
  
   All Kanji
  Shift JIS level 1 characters.   | 
 
| 
   ALC_KATAKANA  | 
  
   0xA1 - 0xDF  | 
  
   Shift JIS
  characters 0x814A, 0x814B, 0x8152, 0x8153, 0x815B, and 0x8340 - 0x8396.   | 
 
| 
   ALC_KANJI  | 
  
   N/A  | 
  
   All Kanji
  characters, Shift JIS levels 1, 2, and 3.   | 
 
 
The following
table shows the characters in Shift-JIS in each ALC_ set supported in the
Japanese version:
| 
   ALC_
  value  | 
  
   Shift
  JIS Code  | 
 
| 
   ALC_HIRAGANA  | 
  
    0x8154, 0x8155, and 0x829F - 0x82F1  | 
 
| 
   ALC_JIS1  | 
  
   0x8156 - 0x815A, 0x889F - 0x9872  | 
 
| 
   ALC_KANJI  | 
  
   0x8156 - 0x815A, 0x889F - 0xEAA4, 0xED40 - 0xEDFC, 0xEE40 - 0xEEFC, 0xF040 - 0xF9FC, 0xFAF0 - 0xFAFC, 0xFB40 - 0xFBFC, 0xFC40 - 0xFC4B  | 
 
| 
   ALC_KATAKANA  | 
  
   0x814A,
  0x814B, 0x8152, 0x8153, 0x815B, 0x8340 - 0x8396  | 
 
| 
   ALC_LCALPHA  | 
  
   0x8281 - 0x829A  | 
 
| 
   ALC_MATH  | 
  
   0x8143,
  0x8144, 0x814F, 0x815E, 0x8169, 0x816A, 0x816F, 0x8170, 0x817B - 0x817E, 0x8180 - 0x8188, 0x8193, 0x8196  | 
 
| 
   ALC_MONETARY  | 
  
   0x8143,
  0x8144, 0x818F - 0x8192  | 
 
| 
   ALC_NONPRINT  | 
  
   0x8140  | 
 
| 
   ALC_NUMERIC  | 
  
   0x824F - 0x8258  | 
 
| 
   ALC_OTHER  | 
  
   0x814C - 0x814E, 0x8150, 0x8151, 0x8160 - 0x8164, 0x816B, 0x816C, 0x8171 - 0x8174, 0x8179, 0x817A, 0x817F,  0x8189 - 0x818E, 0x8194, 0x8197 - 0x81FC, 0x8240 - 0x824E, 0x8259 - 0x825F, 0x827A - 0x8280, 0x829B - 0x829E, 0x82F2 - 0x82FC, 0x837F, 0x897 - 0x83FC, 0x8840 - 0x84FC, 0x8740 - 0x879D    | 
 
| 
   ALC_PUNC  | 
  
   0x8141 - 0x8149, 0x815B - 0x815F, 0x8165 - 0x816A, 0x816D - 0x8170, 0x8175 - 0x8178, 0x817C, 0x8195   | 
 
| 
   ALC_UCALPHA  | 
  
   0x8260 - 0x8279  | 
 
| 
   ALC_WHITE  | 
  
   0x8140  | 
 
A recognizer
must not return a symbol value outside the specified subset. However, a recognizer
does not have to force a match to the subset; it can instead return  unknown 
if a suitable match is not found.
You can set
the ALC_ value for an hedit or bedit control in a dialog box by insert-ing a
special string in the .RC file s CONTROL statement. This string is in the form
ALC<xxxx> where xxxx represents a case-independent
hexadecimal ALC_ code, without a preceding 0x qualifier. You can append normal
window text after the ALC_ entry.
The following
line demonstrates setting the ALC_ value for an hedit control using a CONTROL
statement:
CONTROL "ALC<402C>Dollars",
IDD_PAID, "hedit", ES_LEFT | ... etc. 
 
In the above
example, the ALC<402C> value is stripped out with  Dollars  left as window
text. The number 402C is the hexadecimal equivalent of:
ALC_NUMERIC | ALC_PUNC | ALC_MONETARY | ALC_GESTURE 
 
The following
example allows only kanji characters, katakana characters, and gestures; it
does not specify initial window text:
CONTROL "ALC<74000>", IDD_J,
"hedit", ES_LEFT | ... etc.